package com.yygo.service.impl;

import com.yygo.dao.MoneyTransferDao;
import com.yygo.model.MoneyTransferRecord;
import com.yygo.model.User;
import com.yygo.service.MoneyTransferManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by tiansha on 2015/11/7.
 */
@Service("moneyTransferManager")
public class MoneyTransferManagerImpl extends GenericManagerImpl<MoneyTransferRecord, Long> implements MoneyTransferManager {

    private MoneyTransferDao moneyTransferDao;

    @Autowired
    public MoneyTransferManagerImpl(MoneyTransferDao moneyTransferDao) {
        super(moneyTransferDao);
        this.moneyTransferDao = moneyTransferDao;
    }

    public List<MoneyTransferRecord> getPendingMoneyTransferRecords(User user) {
        return moneyTransferDao.getPendingMoneyTransferRecords(user);
    }

    public List<MoneyTransferRecord> getTransferredMoneyTransferRecords(User user) {
        return moneyTransferDao.getTransferredMoneyTransferRecords(user);
    }
}
